package com.baike.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author:pjm
 * 视频播放进度表
 */
@Data
@Accessors(chain = true)
@Document(collection = "videoLearn")//指定映射
public class VideoLearnedStatusDTO implements Serializable {
    //视频id
    @ApiModelProperty(value = "视频id")
    @Id
    private Long videoId;
    //课程id
    private Long lessonId;
    //学生id
    private Long studentId;
    //已学习时长
    private Long learnedDuration;
    //视频播放进度
    private Long videoProgress;
    //视频总时长
    private Long videoDuration;

    //学习状态 1,已学完 2,正在学
    private Integer learnedStatus;

    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createDate;

    //修改状态时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateDate;


}
